//
//  TIMCustomMenu.h
//  Demo_sdk
//
//  Created by Deli Xia on 2018/7/12.
//  Copyright © 2018年 Deli Xia. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "TIMMessage.h"

typedef NS_ENUM(NSInteger, TPSChatMenuItemType) {
    TPSChatMenuItemTypeCancel, // 取消
    TPSChatMenuItemTypeCopy, // 复制
    TPSChatMenuItemTypeRelay, // 转发
    TPSChatMenuItemTypeDelete, // 删除
    TPSChatMenuItemTypeRevoke, // 撤回
};

@interface TIMCustomMenu : UIView <UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>

@property (nonatomic, strong) NSMutableArray *titles;
@property (nonatomic, strong) UIImageView *backgroundImageView;
@property (nonatomic, strong) UIImageView *arrowImageView;
@property (nonatomic, strong) UICollectionView *collectionView;
@property (nonatomic, strong) UIView  * menuBackView;

@property (nonatomic, assign, readonly) BOOL isShow;
@property (nonatomic, assign) TIMMessage *message;
@property (nonatomic, copy) void (^actionBlcok)();

- (void)showInView:(UIView *)view withMessage:(TIMMessage *)message rect:(CGRect)rect actionBlock:(void (^)(TPSChatMenuItemType))actionBlock;

- (void)dismiss;

@end
